<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="../js/vue.js"></script>
</head>

<body>
  <div id ="app">

    <!-- 当成字符串去解析 -->
    <h2 :class="['active','line']" class="base">{{message}}</h2>

    <!-- 当成变量去解析 -->
    <h2 :class="[active,line]" class="base">{{message}}</h2>

    <h2 :class="getClasses()" class="base">{{message}}</h2>

  </div>

  <script>
   var vm = new Vue({
    el: '#app',
    data: {
      message:'hello',
      active:'aaaa',
      line:'bbbb'
    },
    methods: {
      getClasses:function(){
        return [this.active,this.line]
      }
    }
   });
  </script>
</body>

</html>